/**
 * ReportGear(2011)
 */
package com.reportgear.report.model.cell.painter;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;

import com.reportgear.report.model.cell.Cell;
import com.reportgear.report.view.grid.util.PaintUtils;

/**
 * 默认单元格绘制器
 * 
 * @version 1.0 2011-3-26
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since Report 1.0
 */
public class DefaultCellPainter implements CellPainter {

	@Override
	public void paint(Graphics g, Rectangle rect, Cell cell) {
		CellPaintUtils.paintCellStyleString((Graphics2D) g, rect, String.valueOf(cell.getValue()), cell.getStyle());
	}

}
